Skip to content

BUG: Error reporting str.startswith and str.endswith #45897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 14, 2022

Conversation

NumberPiOso
Copy link
Contributor

@@ -295,7 +295,7 @@ Conversion

Strings
^^^^^^^
-
- Bug in :meth:`str.startswith` and :meth:`str.endswith` when using other series as parameters. (:issue:`3485`)
Copy link
Member

@mroeschke mroeschke Feb 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to mention that a TypeError now raises when not passing a string as pat.

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment otherwise LGTM.

@mroeschke mroeschke added Error Reporting Incorrect or improved errors from pandas Strings String extension data type and string data labels Feb 10, 2022
@mroeschke mroeschke added this to the 1.5 milestone Feb 10, 2022
@mroeschke mroeschke merged commit bf2f6e5 into pandas-dev:main Feb 14, 2022
@mroeschke
Copy link
Member

Thanks again! (Failures were unreleated)

@NumberPiOso NumberPiOso deleted the bug_startswith_endswith branch February 14, 2022 23:40
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* BUG: Error reporting str.startswith and str.endswith

Close pandas-dev#3485

* Bug: Explicit TypeError parameter in whatsnew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

startswith function gives misleading results when passed a series
2 participants